{{#unless revisions}}
	<p>{{localize 'revision_none'}}</p>
{{/unless}}

<div class="view-revision">
	{{#if hasDiff}}
		<h1>{{revision.title}}</h1>
		<h2>Changed by {{revision.firstname}} {{revision.lastname}}</h2>
		<Ui::UiSpacer @size="200" />
		<div class="diff-zone wysiwyg">
			{{{diff}}}
		</div>
	{{/if}}
</div>

{{#if canRollback}}
	<Ui::UiSpacer @size="400" />
	{{ui/ui-button color=constants.Color.Red icon=constants.Icon.TimeBack light=true label=(localize 'restore') onClick=(action "onShowModal")}}
{{/if}}

<div id="document-rollback-modal" class="modal" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">{{localize 'revision_restore'}}</div>
			<div class="modal-body">
				<p>{{localize 'revision_restore_confirm'}}</p>
			</div>
			<div class="modal-footer">
				{{ui/ui-button color=constants.Color.Gray light=true label=(localize 'cancel') dismiss=true}}
				{{ui/ui-button color=constants.Color.Red light=true label=(localize 'restore') onClick=(action "onRollback")}}
			</div>
		</div>
	</div>
</div>
